<template>
<div class="list">
    <ul>
        <li class="tab" :class="{active: currentIndex==index}"  v-for="(item,index) in tabs" :key="index" @click="$emit('deliverIndex',index)">{{item.tabName}}</li>
    </ul>
    </div>
</template>

<script>
export default {
    props: ['tabs','currentIndex']
}
</script>

<style lang="scss" scoped>
.list {
    width: 20%;
    height: 100%;
    float: left;
}
.list ul {
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}
.list ul li{
    margin: 30px 0;
    color: #666;
    border-left: 3px solid transparent;
}
.list ul li.active{
    font-weight: bold;
    border-left: 3px solid red;
}
</style>